#pragma once
#include "tenumxxx.hpp"
#include <vector>

class CEnumPins : public TEnumXXX<IEnumPins, IPin*>
{
    CEnumPins(IPin* const*, ULONG);
    virtual ~CEnumPins();
    
    CEnumPins(const CEnumPins&);
    
    CEnumPins& operator=(const CEnumPins&);
    
public:

    static HRESULT CreateInstance(IPin* const*, ULONG, IEnumPins**);
    
    HRESULT STDMETHODCALLTYPE Clone(IEnumPins**);

protected:

    HRESULT GetCount(ULONG&) const;
    HRESULT GetItem(ULONG, IPin*&);
    void ReleaseItems(IPin**, ULONG);

private:

    typedef std::vector<IPin*> pins_t;
    pins_t m_pins;
    
};
